import numpy as np

from core.variable import Variable
from utils.functions_collect import sin

if __name__ == '__main__':
    x = Variable([[1, 2, 3], [4, 5, 6]])
    y = Variable([[2, 3, 4], [5, 6, 7]])
    y = x * y
    y.backward()
    print(y)
    print(x.grad)

    x = Variable(np.array(np.pi / 4))
    y = sin(x)
    y.backward()
    print(y.data)
    print(x.grad.data)


